package com.cndatacom.teleweb.service.impl;

import org.hibernate.criterion.DetachedCriteria;

import com.cndatacom.teleweb.common.PaginationModel;
import com.cndatacom.teleweb.dao.IFilePublishDao;
import com.cndatacom.teleweb.model.FilePublish;
import com.cndatacom.teleweb.service.IFilePublishService;

public class FilePublishService implements IFilePublishService {

	private IFilePublishDao filePublishDao;

	public IFilePublishDao getFilePublishDao() {
		return filePublishDao;
	}

	public void setFilePublishDao(IFilePublishDao filePublishDao) {
		this.filePublishDao = filePublishDao;
	}

	public boolean delFilePublish(FilePublish filePublish) {
		return filePublishDao.delFilePublish(filePublish);
	}

	public PaginationModel getAllFilePublish(int offset, int pageSize) {
		return filePublishDao.getAllFilePublish(offset, pageSize);
	}

	public FilePublish getFilePublishById(int fileId) {
		return filePublishDao.getFilePublishById(fileId);
	}

	public FilePublish saveOrUpdateFilePublish(FilePublish filePublish) {
		return filePublishDao.saveOrUpdateFilePublish(filePublish);
		
	}

	public PaginationModel getFilePublishByQuery(DetachedCriteria detachedCriteria, int offset, int pageSize) {
		return filePublishDao.getFilePublishByQuery(detachedCriteria, offset, pageSize);
	}

}
